package com.bridge.controller;

import com.bridge.annotation.DS;
import com.bridge.enums.CommonConstant;
import com.bridge.mapper.UserMapper;
import com.bridge.model.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class UserController {

    @Resource
    private UserMapper userMapper;

    @RequestMapping("/getUserList")
    public List<User> getUserList() {
        return userMapper.getUserList(new User());
    }

    @DS(CommonConstant.SLAVE)
    @RequestMapping("/getUserList2")
    public List<User> getUserList2() {
        return userMapper.getUserList(new User());
    }

}